package digital.store.springmvc.controller;

import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
@RequestMapping(value = "/logout")
public class LogoutController {
	@RequestMapping( method = RequestMethod.GET)
	public String accessLogout(HttpSession session)
	{
		session.removeAttribute("user");
		return "redirect:/home/";
	}
}
